/*
 * @Author: laihaib
 * @Date: 2021-02-18 11:12:32
 * @LastEditors: laihaib
 * @LastEditTime: 2021-02-18 11:15:52
 * @Description: file content
 * @FilePath: \leet-code\l26.js
 */

var removeDuplicates = function (nums) {
  nums = nums.reduce((prev, cur) => {
    if (prev.includes(cur)) {
      return prev;
    }
    prev.push(cur);
    return prev;
  }, []);
  return nums.length;
};
